/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmWeekly extends BasicModel<PmWeekly> {
  projectno?: string; // 项目编号
  projectname?: string; // 项目名称
  createDate?: string; // 填报时间
  starttime?: string; // 填报时间
  contractor?: string; // 承包商
  material?: string; // material
  materialnumber?: number; // materialnumber
  allmaterial?: number; // allmaterial
  endtime?: string; // 结束日期
  picno?: string; // picno
  constructionrecord?: string; // constructionrecord
  createByName?: string; // 填报人
  pmWeeklyMaterialList?: any[]; // 子表列表
}

export const pmWeeklyList = (params?: PmWeekly | any) =>
  defHttp.get<PmWeekly>({ url: adminPath + '/proj/weekly/pmWeekly/list', params });

export const pmWeeklyListData = (params?: PmWeekly | any) =>
  defHttp.post<Page<PmWeekly>>({ url: adminPath + '/proj/weekly/pmWeekly/listData', params });

export const pmWeeklyForm = (params?: PmWeekly | any) =>
  defHttp.get<PmWeekly>({ url: adminPath + '/proj/weekly/pmWeekly/form', params });

export const pmWeeklySave = (params?: any, data?: PmWeekly | any) =>
  defHttp.postJson<PmWeekly>({ url: adminPath + '/proj/weekly/pmWeekly/save', params, data });

export const pmWeeklyDelete = (params?: PmWeekly | any) =>
  defHttp.get<PmWeekly>({ url: adminPath + '/proj/weekly/pmWeekly/delete', params });
